import React from "react"
import { useHistory } from "react-router-dom";

export default ({a}: {a: string}) => {
    const history = useHistory();
    React.useEffect(() => {
        console.log('子组件更新', a)
        return () => {
          console.log('子组件卸载', a)
        }
      }, [])
    return <div>
        <button onClick={() => history.push('/2022css')}>跳转</button>
    </div>
}